<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cppMISC: wheels::logFile类 参考</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript" src="../../darkmode_toggle.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cppMISC<span id="projectnumber">&#160;v1.1</span>
   </div>
   <div id="projectbrief">cppMisc 文档系统</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../df/d8d/namespacewheels.html">wheels</a></li><li class="navelem"><a class="el" href="../../db/dba/classwheels_1_1log_file.html">logFile</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">类</a> &#124;
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-attribs">静态 Public 属性</a> &#124;
<a href="../../d8/d9e/classwheels_1_1log_file-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">wheels::logFile类 参考</div></div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="../../d7/dae/log_file_8hpp_source.html">logFile.hpp</a>&gt;</code></p>
<div class="dynheader">
类 wheels::logFile 继承关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d6/d44/classwheels_1_1log_file__inherit__graph.png" border="0" usemap="#awheels_1_1log_file_inherit__map" alt="Inheritance graph"/></div>
<map name="awheels_1_1log_file_inherit__map" id="awheels_1_1log_file_inherit__map">
<area shape="rect" title=" " alt="" coords="5,123,183,352"/>
<area shape="rect" title=" " alt="" coords="45,5,143,75"/>
<area shape="poly" title=" " alt="" coords="97,90,97,123,91,123,91,90"/>
</map>
</div>
<div class="dynheader">
wheels::logFile 的协作图:</div>
<div class="dyncontent">
<div class="center"><img src="../../dc/d22/classwheels_1_1log_file__coll__graph.png" border="0" usemap="#awheels_1_1log_file_coll__map" alt="Collaboration graph"/></div>
<map name="awheels_1_1log_file_coll__map" id="awheels_1_1log_file_coll__map">
<area shape="rect" title=" " alt="" coords="5,123,183,352"/>
<area shape="rect" title=" " alt="" coords="45,5,143,75"/>
<area shape="poly" title=" " alt="" coords="97,90,97,123,91,123,91,90"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
类</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../da/dcf/structwheels_1_1log_file_1_1st_file.html">stFile</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:abbe0d7636998034adaeac004821ed379" id="r_abbe0d7636998034adaeac004821ed379"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#abbe0d7636998034adaeac004821ed379">emErrCode</a> { <a class="el" href="#abbe0d7636998034adaeac004821ed379a406523092bf244e8ad47698faf415202">ERR_INIT_DIR</a> = -1000
, <a class="el" href="#abbe0d7636998034adaeac004821ed379afb5cf739ff402a8d92c3b0c0602ee91d">ERR_INIT_FILE</a>
, <a class="el" href="#abbe0d7636998034adaeac004821ed379ad15046a5c7c08cd5372722a500fbb166">OK</a> = 0
 }</td></tr>
<tr class="separator:abbe0d7636998034adaeac004821ed379"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:adeba71a87579ff6412c3dc8622f71841" id="r_adeba71a87579ff6412c3dc8622f71841"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#adeba71a87579ff6412c3dc8622f71841">logFile</a> (const std::string &amp;logroot, bool stdo=true, bool stde=true)</td></tr>
<tr class="memdesc:adeba71a87579ff6412c3dc8622f71841"><td class="mdescLeft">&#160;</td><td class="mdescRight">ctor  <br /></td></tr>
<tr class="separator:adeba71a87579ff6412c3dc8622f71841"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab989537e4794a5e2de465207d7228566" id="r_ab989537e4794a5e2de465207d7228566"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ab989537e4794a5e2de465207d7228566">~logFile</a> ()</td></tr>
<tr class="separator:ab989537e4794a5e2de465207d7228566"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0ca6507647b42f11202d3e08f2cfbad" id="r_af0ca6507647b42f11202d3e08f2cfbad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af0ca6507647b42f11202d3e08f2cfbad">configure</a> (size_t maxF, size_t maxLine, const std::string &amp;logroot)</td></tr>
<tr class="memdesc:af0ca6507647b42f11202d3e08f2cfbad"><td class="mdescLeft">&#160;</td><td class="mdescRight">配置LOG生成控制参数  <br /></td></tr>
<tr class="separator:af0ca6507647b42f11202d3e08f2cfbad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ada41c02611e4626902f6d2cae1241ead" id="r_ada41c02611e4626902f6d2cae1241ead"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ada41c02611e4626902f6d2cae1241ead">add</a> (const std::string &amp;data)</td></tr>
<tr class="memdesc:ada41c02611e4626902f6d2cae1241ead"><td class="mdescLeft">&#160;</td><td class="mdescRight">增加数据内容。将数据内容写入当前的LOG文件  <br /></td></tr>
<tr class="separator:ada41c02611e4626902f6d2cae1241ead"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-static-attribs" name="pub-static-attribs"></a>
静态 Public 属性</h2></td></tr>
<tr class="memitem:ad44e9a2063a2554b11e333692f59570d" id="r_ad44e9a2063a2554b11e333692f59570d"><td class="memItemLeft" align="right" valign="top">static const size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad44e9a2063a2554b11e333692f59570d">MAX_LINE_LEN</a> = 160</td></tr>
<tr class="separator:ad44e9a2063a2554b11e333692f59570d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock">
<p class="definition">在文件 <a class="el" href="../../d7/dae/log_file_8hpp_source.html">logFile.hpp</a> 第 <a class="el" href="../../d7/dae/log_file_8hpp_source.html#l00020">20</a> 行定义.</p>
</div><h2 class="groupheader">成员枚举类型说明</h2>
<a id="abbe0d7636998034adaeac004821ed379" name="abbe0d7636998034adaeac004821ed379"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abbe0d7636998034adaeac004821ed379">&#9670;&#160;</a></span>emErrCode</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="#abbe0d7636998034adaeac004821ed379">wheels::logFile::emErrCode</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">枚举值</th></tr><tr><td class="fieldname"><a id="abbe0d7636998034adaeac004821ed379a406523092bf244e8ad47698faf415202" name="abbe0d7636998034adaeac004821ed379a406523092bf244e8ad47698faf415202"></a>ERR_INIT_DIR&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abbe0d7636998034adaeac004821ed379afb5cf739ff402a8d92c3b0c0602ee91d" name="abbe0d7636998034adaeac004821ed379afb5cf739ff402a8d92c3b0c0602ee91d"></a>ERR_INIT_FILE&#160;</td><td class="fielddoc"></td></tr>
<tr><td class="fieldname"><a id="abbe0d7636998034adaeac004821ed379ad15046a5c7c08cd5372722a500fbb166" name="abbe0d7636998034adaeac004821ed379ad15046a5c7c08cd5372722a500fbb166"></a>OK&#160;</td><td class="fielddoc"></td></tr>
</table>

<p class="definition">在文件 <a class="el" href="../../d7/dae/log_file_8hpp_source.html">logFile.hpp</a> 第 <a class="el" href="../../d7/dae/log_file_8hpp_source.html#l00023">23</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">构造及析构函数说明</h2>
<a id="adeba71a87579ff6412c3dc8622f71841" name="adeba71a87579ff6412c3dc8622f71841"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adeba71a87579ff6412c3dc8622f71841">&#9670;&#160;</a></span>logFile()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">logFile::logFile </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>logroot</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>stdo</em></span><span class="paramdefsep"> = </span><span class="paramdefval">true</span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>stde</em></span><span class="paramdefsep"> = </span><span class="paramdefval">true</span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>ctor </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">logroot[</td><td>I ], log文件的根目录，如果没有配置则自动配置成当前路径下log目录 </td></tr>
    <tr><td class="paramname">stdo[</td><td>I ], 是否重定向标准输出流 </td></tr>
    <tr><td class="paramname">stde[</td><td>I ]， 是否重定向标准错误流 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>注解</dt><dd>logroot并不包含log目录，程序启动后会自动在根目录下创建log目录 </dd></dl>

<p class="definition">在文件 <a class="el" href="../../d2/d97/log_file_8cpp_source.html">logFile.cpp</a> 第 <a class="el" href="../../d2/d97/log_file_8cpp_source.html#l00201">201</a> 行定义.</p>

</div>
</div>
<a id="ab989537e4794a5e2de465207d7228566" name="ab989537e4794a5e2de465207d7228566"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab989537e4794a5e2de465207d7228566">&#9670;&#160;</a></span>~logFile()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">logFile::~logFile </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d2/d97/log_file_8cpp_source.html">logFile.cpp</a> 第 <a class="el" href="../../d2/d97/log_file_8cpp_source.html#l00230">230</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="ada41c02611e4626902f6d2cae1241ead" name="ada41c02611e4626902f6d2cae1241ead"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ada41c02611e4626902f6d2cae1241ead">&#9670;&#160;</a></span>add()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void logFile::add </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>data</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>增加数据内容。将数据内容写入当前的LOG文件 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">data[</td><td>I ],要登记成日志的数据 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d2/d97/log_file_8cpp_source.html">logFile.cpp</a> 第 <a class="el" href="../../d2/d97/log_file_8cpp_source.html#l00235">235</a> 行定义.</p>

</div>
</div>
<a id="af0ca6507647b42f11202d3e08f2cfbad" name="af0ca6507647b42f11202d3e08f2cfbad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af0ca6507647b42f11202d3e08f2cfbad">&#9670;&#160;</a></span>configure()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void logFile::configure </td>
          <td>(</td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>maxF</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t</td>          <td class="paramname"><span class="paramname"><em>maxLine</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;</td>          <td class="paramname"><span class="paramname"><em>logroot</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>配置LOG生成控制参数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">maxF[</td><td>I ] 最大文件数量 </td></tr>
    <tr><td class="paramname">maxLine[</td><td>I ] 每个文件的最大行数 </td></tr>
    <tr><td class="paramname">logroot[</td><td>I ] log目录的父目录名，可以是相对路径 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="../../d2/d97/log_file_8cpp_source.html">logFile.cpp</a> 第 <a class="el" href="../../d2/d97/log_file_8cpp_source.html#l00011">11</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="../../db/dba/classwheels_1_1log_file_af0ca6507647b42f11202d3e08f2cfbad_cgraph.png" border="0" usemap="#adb/dba/classwheels_1_1log_file_af0ca6507647b42f11202d3e08f2cfbad_cgraph" alt=""/></div>
<map name="adb/dba/classwheels_1_1log_file_af0ca6507647b42f11202d3e08f2cfbad_cgraph" id="adb/dba/classwheels_1_1log_file_af0ca6507647b42f11202d3e08f2cfbad_cgraph">
<area shape="rect" title="配置LOG生成控制参数" alt="" coords="5,5,175,32"/>
<area shape="rect" href="../../d0/d0e/misc_8hpp.html#a82532c7da66cb6f199552ed698d23c48" title="removeFile" alt="" coords="223,5,308,32"/>
<area shape="poly" title=" " alt="" coords="175,16,207,16,207,21,175,21"/>
<area shape="rect" href="../../dc/d2f/classfs.html#aadd2e9ee5179b644dac3206cdd662f34" title="删除满足条件要求的文件或者目录" alt="" coords="356,5,460,32"/>
<area shape="poly" title=" " alt="" coords="308,16,340,16,340,21,308,21"/>
<area shape="rect" href="../../d0/d0e/misc_8hpp.html#adc75a513912f0c4d40d5882955b411c1" title="判断是否是目录" alt="" coords="508,5,557,32"/>
<area shape="poly" title=" " alt="" coords="461,16,492,16,492,21,461,21"/>
<area shape="rect" href="../../dc/d2f/classfs.html#a821cb3cdae648caf6a9f92b39c864421" title="判断给定的路径是否是目录" alt="" coords="605,5,672,32"/>
<area shape="poly" title=" " alt="" coords="557,16,589,16,589,21,557,21"/>
</map>
</div>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="ad44e9a2063a2554b11e333692f59570d" name="ad44e9a2063a2554b11e333692f59570d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad44e9a2063a2554b11e333692f59570d">&#9670;&#160;</a></span>MAX_LINE_LEN</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const size_t logFile::MAX_LINE_LEN = 160</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d7/dae/log_file_8hpp_source.html">logFile.hpp</a> 第 <a class="el" href="../../d7/dae/log_file_8hpp_source.html#l00055">55</a> 行定义.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>include/<a class="el" href="../../d7/dae/log_file_8hpp_source.html">logFile.hpp</a></li>
<li>src/<a class="el" href="../../d2/d97/log_file_8cpp_source.html">logFile.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
